#include <QFile>
#include "document.h"

Document::Document()
{
}

void Document::loadXml(const QString &filename)
{
  QFile file(filename);
  if (!file.open(QIODevice::Text | QIODevice::ReadOnly))
    return;
  this->setContent(&file);
}

void Document::loadTxt(const QString &filename)
{
  QFile file(filename);
  if (!file.open(QIODevice::Text | QIODevice::ReadOnly))
    return;
  this->setContent("<text>"+file.readAll()+"</text>");
}
